package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.Discuss;
import cn.wolfcode.trip.base.mapper.DiscussMapper;
import cn.wolfcode.trip.base.query.DiscussQuery;
import cn.wolfcode.trip.base.service.IDiscussService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DiscussServiceImpl implements IDiscussService{
    @Autowired
    private DiscussMapper discussMapper;


    @Override
    public PageInfo queryForList(DiscussQuery qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<Discuss> list = discussMapper.selectForList(qo);
        return new PageInfo(list);
    }

    @Override
    public void saveOrUpdate(Discuss discuss) {

    }

    @Override
    public Discuss queryByDiscussId(Long discussId) {
        return null;
    }


}
